Home Reference Source Test
public class | source

BGMapBingMaps

Extends:

BGMapWrapper → BGMapBingMaps

Bing Maps as background map provider.

See:

Constructor Summary

Public Constructor
public

Creates an instance of Bing Maps.

Method Summary

Public Methods
public

Add click event.

public

Add Pan/Drag event.

public

Add zoom event.

public

createCanvas(id: number): HTMLElement

Given one id it creates a canvas object.

public

Returns the latitude(Y) of the bounding box northwest corner.

public

Returns the longitude(X) of the bounding box northwest corner.

public

getContainer(): HTMLElement

Returns the map's containing HTML element.

public

Returns the map's current zoom level.

Inherited Summary

From class BGMapWrapper
public

This is the background map object that comes from the background map provider(e.g., MapBox).

public

loaderDiv: HTMLDivElement

The div that contains the loader.

public

Add click event.

public

addEventListener(eventstr: string, eventfunction: Function): void

Adds a listener to a specified event type.

public

Add Pan/Drag event.

public

Add zoom event.

public

createCanvas(id: number): HTMLElement

Given one id it creates a canvas object.

public

createLoader(): void

Auxiliar method to be called when there is no loader and we want to create one.

public

Returns the background map object.

public

Returns the latitude of the bounding box northwest corner.

public

Returns the longitude of the bounding box northwest corner.

public

getContainer(): HTMLElement

Returns the map's containing HTML element.

public

Returns the height of the canvas element.

public

Returns the width of the canvas elment.

public

Returns the map's current zoom level.

public

showLoader(): void

Shows loader at the beginning when the API is loading the data.

Public Constructors

public constructor(bgmap: Object) source

Creates an instance of Bing Maps.

Override:

BGMapWrapper#constructor

Params:

NameTypeAttributeDescription
bgmap Object

The Bing Maps object.

Public Methods

public addClickEvent(map: Map) source

Add click event.

Override:

BGMapWrapper#addClickEvent

Params:

NameTypeAttributeDescription
map Map

The function to be called when the user clicks on the map.

public addPanEvent(fun: Function) source

Add Pan/Drag event.

Override:

BGMapWrapper#addPanEvent

Params:

NameTypeAttributeDescription
fun Function

The function to be called when the user performs drag on the map.

public addZoomEvent(fun: Function) source

Add zoom event.

Override:

BGMapWrapper#addZoomEvent

Params:

NameTypeAttributeDescription
fun Function

The function to be called when the user performs zoom in/out on the map.

public createCanvas(id: number): HTMLElement source

Given one id it creates a canvas object.

Override:

BGMapWrapper#createCanvas

Params:

NameTypeAttributeDescription
id number

The id of the canvas to be created.

Return:

HTMLElement

Canvas object where everything will be drawn.

See:

TODO:

  • Understand case mapbox comment bellow.

public getCenterLat(): number source

Returns the latitude(Y) of the bounding box northwest corner.

Override:

BGMapWrapper#getCenterLat

Return:

number

Latitude of northwest corner, measured in degrees.

See:

public getCenterLng(): number source

Returns the longitude(X) of the bounding box northwest corner.

Override:

BGMapWrapper#getCenterLng

Return:

number

Longitude of northwest corner, measured in degrees.

See:

public getContainer(): HTMLElement source

Returns the map's containing HTML element.

Override:

BGMapWrapper#getContainer

Return:

HTMLElement

The map's HTML element container.

public getZoom(): number source

Returns the map's current zoom level.

Override:

BGMapWrapper#getZoom

Return:

number

The map's current zoom level.